-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() #19147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+63
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ayesh
approved these changes
Jul 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @thecaliskan @devnexen. Looks good!
CURLINFO_QUEUE_TIME_T
is the last TIME
Curl-info const we did not have in ext/curl. I'm glad we are closing this gap.
Co-authored-by: Ayesh Karunaratne <[email protected]>
Hi @bukka Could you check this PR ? |
bukka
approved these changes
Jul 17, 2025
Thanks for the contribution! For the record the NEWS updated in a8a3c81 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo()
Summary
This patch adds support for the
CURLINFO_QUEUE_TIME_T
constant in thecurl_getinfo()
function when compiled with libcurl >= 8.6.0.CURLINFO_QUEUE_TIME_T
This constant allows retrieving the time (in microseconds) that the request spent in libcurl’s connection queue before it was sent.Source
Details
curl_getinfo($ch, CURLINFO_QUEUE_TIME_T)
when available."queue_time_us"
key to the associative array returned bycurl_getinfo($ch)
if applicable.SKIPIF
check ensures that the test is skipped if the libcurl version is too old..phpt
test file:ext/curl/tests/curl_getinfo_CURLINFO_QUEUE_TIME_T.phpt
.Requirements
Example usage
CURL Times
An overview of the time values available from curl_easy_getinfo
curl_easy_perform()
|
|--QUEUE
|--|--NAMELOOKUP
|--|--|--CONNECT
|--|--|--|--APPCONNECT
|--|--|--|--|--PRETRANSFER
|--|--|--|--|--|--POSTTRANSFER
|--|--|--|--|--|--|--STARTTRANSFER
|--|--|--|--|--|--|--|--TOTAL
|--|--|--|--|--|--|--|--REDIRECT